{template '_header'}


<div class="page-heading">
    <h2>{$applytitle}提现申请</h2>
</div>

<form action="./index.php" method="get" class="form-horizontal table-search" role="form">
    <input type="hidden" name="c" value="site" />
    <input type="hidden" name="a" value="entry" />
    <input type="hidden" name="m" value="ewei_shopv2" />
    <input type="hidden" name="do" value="web" />
    <input type="hidden" name="r" value="merch.check.status{$action_status}" />
    <div class="page-toolbar row m-b-sm m-t-sm">
        <div class="col-sm-6">

            <div class="btn-group btn-group-sm" style='float:left'>
                <button class="btn btn-default btn-sm"  type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>

            </div>


            <div class='input-group input-group-sm'   >

                <select name='timetype'   class='form-control  input-sm select-md'   style="width:95px;"  >
                    <option value=''>不按时间</option>
                    {if $status>=1}<option value='applytime' {if $_GPC['timetype']=='applytime'}selected{/if}>申请时间</option>{/if}
                    {if $status>=2}<option value='checktime' {if $_GPC['timetype']=='checktime'}selected{/if}>审核时间</option>{/if}
                    {if $status>=3}<option value='paytime' {if $_GPC['timetype']=='paytime'}selected{/if}>打款时间</option>{/if}
                </select>

                {php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}

            </div>
        </div>

        <div class="col-sm-6 pull-right">
            <select name='searchfield'  class='form-control  input-sm select-md'   style="width:110px;"  >
                <option value='member' {if $_GPC['searchfield']=='member'}selected{/if}>商户信息</option>
                <option value='applyno' {if $_GPC['searchfield']=='applyno'}selected{/if}>提现单号</option>
            </select>
            <div class="input-group">
                <input type="text" class="form-control input-sm"  name="keyword" value="{$_GPC['keyword']}" placeholder="请输入关键词"/>
				<span class="input-group-btn">
					<button class="btn btn-sm btn-primary" type="submit"> 搜索</button>
					   {ifp 'merch.check.export'}
							<button type="submit" name="export" value="1" class="btn btn-success btn-sm">导出</button>
							{/if}
				</span>
            </div>

        </div>
    </div>
</form>

{if count($list)>0}
<table class="table table-hover table-responsive">
    <thead class="navbar-inner">
    <tr>
        <!--<th style="width:25px;"><input type='checkbox' /></th>-->
        <th style="width:200px;">提现单号</th>
        <th style="width:120px;">商户信息</th>
        <th style="width:110px;">申请金额<br>抽成后金额</th>
        {if $status > 1}
        <th style="width:110px;">通过申请金额<br>抽成后金额</th>
        {/if}
        {if $status == 3}
        <th style="width:100px;">实际打款金额</th>
        {/if}
        <th style="width:100px;">抽成比例</th>
        <th style="width:120px;">申请订单个数{if $status > 1}<br>通过申请订单个数{/if}</th>
        <th style="width:100px;">提现方式</th>
        {if $_W['routes']=='merch.check.status2'}
        <th style="width:80px;">最终打款</th>
        {/if}
        <th style="width:100px;">申请时间</th>
        <th style="width:100px;">操作</th>
    </tr>
    </thead>
    <tbody>
    {loop $list $row}
    <tr>
        <!--<td style="position: relative; "><input type='checkbox'   value="{$row['id']}"/></td>-->
        <td>{$row['applyno']}</td>
        <td>{$row['realname']}<br/>{$row['mobile']}</td>
        <td>{$row['realprice']}<br>{$row['realpricerate']}</td>
        {if $status > 1}
        <td>{$row['passrealprice']}<br>{$row['passrealpricerate']}</td>
        {/if}
        {if $status == 3}
        <td>{$row['finalprice']}</td>
        {/if}
        <td>{$row['payrate']}%</td>
        <td>{$row['ordernum']}{if $status > 1}<br>{$row['passordernum']}{/if}</td>
        <td>
            <span class='label {if empty($row['applytype'])}label-success{else if $row['applytype']=='2'}label-warning{else if $row['applytype']=='3'}label-primary{/if}'>
            {$apply_type[$row['applytype']]}
            </span>
        </td>
        {if $_W['routes']=='merch.check.status2'}
        <td>{$row['finalprice']}</td>
        {/if}
        <td>
            {php echo date('Y-m-d',$row['applytime'])}<br/>{php echo date('H:i',$row['applytime'])}
        </td>
        <td style="overflow:visible;">
            {ifp 'merch.check.detail'}
                <a class='btn btn-default btn-sm' href="{php echo webUrl('merch/check/detail',array('id' => $row['id'], 'status' => $status))}">详情</a>
            {/if}
            {if $row['status'] != '2'}
                <!--<a data-toggle='ajaxRemove' href="{php echo webUrl('merch/check/delete',array('id' => $row['id']));}" class="btn btn-danger btn-sm" data-confirm='确认要删除此结账单?'>删除</a>-->
            {/if}
        </td>
    </tr>
    {/loop}
    </tbody>
</table>
{else}
<div class='panel panel-default'>
    <div class='panel-body' style='text-align: center;padding:30px;'>
        暂时没有任何申请!
    </div>
</div>
{/if}
{$pager}
{template '_footer'}